import { request } from '@/utils/request'
import type { Token, User,PartialUser } from '@/types/user'

export const userLogin = (data: { loginname: string; password: string }) => {
  return request<Token>({
    url: 'user/login',
    method: 'POST',
    data
  })
}
//用户信息
export const getUserInof = () => {
  return request<PartialUser>({
    url: 'user/info'
  })
}
